home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / controller.dir / Internal_50_Music Button.ls < prev    next >
Encoding:
Text File  |  2004-12-29  |  991 b   |  38 lines

  1. on mouseDown
  2.   global gMute, gFade
  3.   puppetSound("mute/unmute sound")
  4.   vorigMember = the member of sprite the clickOn
  5.   set the member of sprite the clickOn to member("mute music dn")
  6.   updateStage()
  7.   repeat while the stillDown
  8.     nothing()
  9.   end repeat
  10.   set the member of sprite the clickOn to vorigMember
  11.   updateStage()
  12.   if gMute = 0 then
  13.     set the member of sprite the clickOn to member("music muted button")
  14.     set the volume of sound 2 to 0
  15.     gMute = 1
  16.   else
  17.     set the member of sprite the clickOn to member("music on button")
  18.     if gFade <> 1 then
  19.       set the volume of sound 2 to 255
  20.     end if
  21.     gMute = 0
  22.   end if
  23. end
  24.  
  25. on mouseEnter me
  26.   if the member of sprite me.spriteNum = member("music on button") then
  27.     set the member of sprite 23 to member("mute music prompt")
  28.   else
  29.     set the member of sprite 23 to member("unmute music prompt")
  30.   end if
  31.   updateStage()
  32. end
  33.  
  34. on mouseLeave
  35.   set the member of sprite 23 to member("blank prompt")
  36.   updateStage()
  37. end
  38.